home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Shareware World / Comms & Internet / LinkConverter 1.1.2 / Dialog Director v0.7 / Examples / Default Button.as < prev    next >
Encoding:
Text File  |  1998-02-16  |  1.0 KB  |  18 lines  |  [TEXT/ToyS]

  1. Test({|don't crash|:1}, "No dialog ‘default item’ property.", ¬
  2.     "This means make the first push button item into the default button and the second into the cancel button.")
  3. Test({default item:-1}, "dd auto dialog { … default item: -1 … }", ¬
  4.     "This means the same as having no dialog ‘default’ property.")
  5. Test({default item:0}, "dd auto dialog { … default item: 0 … }", ¬
  6.     "This means make no push button items into the default or cancel buttons.")
  7. Test({default item:2}, "dd auto dialog { … default item: x … } -- x≥1", ¬
  8.     "This means make dialog item x into the default push button and the first other push button into the cancel button.")
  9. return
  10.  
  11. on Test(dProp, m1, m2)
  12.     dd auto dialog {size:[320, 95], contents:[¬
  13.         {class:push button, bounds:[250, 65, 310, 85], name:"OK"}, ¬
  14.         {class:push button, bounds:[170, 65, 230, 85], name:"Cancel"}, ¬
  15.         {class:static text, bounds:[10, 10, 310, 10 + 16], contents:m1}, ¬
  16.         {class:static text, bounds:[10, 30, 310, 30 + 28], contents:m2, font:{name:"Geneva", size:10}} ¬
  17.             ]} & dProp
  18. end Test